package com.zh.work.entity.branch;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * code is far away from bug with the animal protecting
 * ┏┓　　　┏┓
 * ┏┛┻━━━┛┻┓
 * ┃　　　　　　　┃
 * ┃　　　━　　　┃
 * ┃　┳┛　┗┳　┃
 * ┃　　　　　　　┃
 * ┃　　　┻　　　┃
 * ┃　　　　　　　┃
 * ┗━┓　　　┏━┛
 * 　　┃　　　┃神兽保佑
 * 　　┃　　　┃代码无BUG！
 * 　　┃　　　┗━━━┓
 * 　　┃　　　　　　　┣┓
 * 　　┃　　　　　　　┏┛
 * 　　┗┓┓┏━┳┓┏┛
 * 　　　┃┫┫　┃┫┫
 * 　　　┗┻┛　┗┻┛
 *
 * @Description: 机构用户管理
 * @Author: Li.HuiNeng
 * @Create in: 2019/8/27
 * @Version: 1.0.1
 */

@ApiModel("机构用户实体类")
@EqualsAndHashCode(callSuper = true)
@Data
@TableName("branch_user")
@JsonInclude(JsonInclude.Include.NON_NULL)
public class BranchUserEntity extends Model<BranchUserEntity> {
    private static final long serialVersionUID = -6041046765059182277L;

    @ApiModelProperty(value = "id", name = "自增主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "逻辑删除字段", name = "deleted")
    @TableLogic
    private Integer deleted;

    @ApiModelProperty(value = "所属角色", name = "userRoler")
    @TableField(value = "user_roler")
    private Integer userRoler;
    
    @ApiModelProperty(value = "所属机构", name = "branchno", notes = "机构编号，此处应该是名字起错")
    @TableField(value = "branch_user")
    private String branchNo;
    
    @ApiModelProperty(value = "机构名称", name = "branchName")
    @TableField(exist = false)
    private String branchName;

    @ApiModelProperty(value = "登陆的用户名", name = "loginName")
    @TableField(value = "login_name")
    private String loginName;

    @ApiModelProperty(value = "真实姓名", name = "trueName")
    @TableField(value = "true_name")
    private String trueName;

    @ApiModelProperty(value = "密码", name = "password")
    @TableField(value = "password")
    private String password;

    @ApiModelProperty(value = "固定电话", name = "telephone")
    @TableField(value = "telephone")
    private String telephone;

    @ApiModelProperty(value = "手机号码", name = "mobile")
    @TableField(value = "mobile")
    private String mobile;


    @ApiModelProperty(value = "电子邮箱", name = "email")
    @TableField(value = "email")
    private String email;

    @ApiModelProperty(value = "地址", name = "address")
    @TableField(value = "address")
    private String address;


    @ApiModelProperty(value = "上次登陆时间", name = "lastLogin")
    @TableField(value = "last_login")
    private String lastLogin;

    @ApiModelProperty(value = "上次错误登陆日期", name = "loginErrorDate")
    @TableField(value = "login_error_date")
    private String loginErrorDate;

    @ApiModelProperty(value = "错误登陆次数", name = "errorCount")
    @TableField(value = "error_count")
    private Integer errorCount;

    @ApiModelProperty(value = "用户状态  1-正常 2-冻结 3-锁定", name = "status")
    @TableField(value = "status")
    private Integer status;


}
